<?php
/*
* The main template file.
*/

get_header();

	// SIDEBAR
	$content_class = ' class="position_left"';
	$sidebar_class = ' class="position_right"';

	$website_selected_position = get_option('sidebar_position');
	
	if ( $website_selected_position == 'left' )
	{
		$content_class = ' class="position_right"';
		$sidebar_class = ' class="position_left"';
	}


?>
    <section id="content_wrapper" class="clearfix">
        <div id="content_with_sidebar" <?php echo $content_class; ?>>
            <div class="page_content" style="margin-top: 30px;">
                <?php get_template_part( 'loop', 'index' ); ?>
            </div>
		</div>
        
        <?php
        echo '<div id="sidebar"'.$sidebar_class.'>';
            echo '<div id="sidebar_content">';
                get_sidebar();
            echo '</div>';
        echo '</div>';
        ?>
        
    </section> <!-- #content_wrapper -->


<?php get_footer(); ?>
